package com.example.reggie;

import com.example.reggie.entity.Employee;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement
@ServletComponentScan
@SpringBootApplication
public class ReggieApplication {
    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext run = SpringApplication.run(ReggieApplication.class, args);
        System.out.println(run.getBean("webMvcConfig"));

        Class<?> aClass = Class.forName("com.example.reggie.entity.Employee");
        Employee object = (Employee) aClass.getConstructor().newInstance();
        System.out.println(object);
    }
}
